# Maintainer: Alexander F Rødseth <xyproto@archlinux.org>
# Contributor: muflax <muflax@gmail.com>
# Contributor: Adrian Siekierka <kontakt@asie.pl>

pkgname=robotfindskitten
pkgver=2.8284271.702
pkgrel=1
pkgdesc='Yet another Zen simulation'
arch=(loong64 x86_64)
url='http://robotfindskitten.org/' # no https available
license=(GPL2)
depends=(ncurses)
makedepends=(setconf)
source=("https://master.dl.sourceforge.net/project/rfk/robotfindskitten-POSIX/ship_it_anyway/robotfindskitten-2.8284271.702.tar.gz")
b2sums=('06024275da4b3b5f87f3f6ab57797aa080263ca920e324b7b34a9e6540a7bae301b4a00b9935f1ffe208779eb5a1becd34b8764b9dbffe4bac95920e8f454afd')

prepare() {
  setconf $pkgname-$pkgver/src/Makefile.in execgamesdir '$(prefix)/bin'
}

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr
  make
}

package() {
  make -C $pkgname-$pkgver prefix="$pkgdir/usr" install
  install -Dm644 $pkgname-$pkgver/nki/vanilla.nki \
    "$pkgdir/usr/share/games/robotfindskitten/vanilla.nki"
}
